var core    = require("core")
,   db      = core.db
,   schema  = db.schema
,   send    = core.send;

var GET     = function(req, res, next){
    var SEND;
    schema.Platform.find({},"-_id -__v").sort({id: -1}).exec(function(err, docs){
        if(err)
            SEND = new send(200000);
        else{
            SEND = new send(0);
            SEND.docs = {
                count   : req.app.platform.count,
                item    : docs
            };
        };

        res.render("platform", SEND);
    });
};

module.exports = GET;
